home *** CD-ROM | disk | FTP | other *** search
/ AI Game Programming Wisdom / AIGameProgrammingWisdom.iso / SourceCode / 11 Learning / 08 Manslow / CTank.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-01  |  642 b   |  30 lines

  1. //Tanks
  2. //Copyright John Manslow
  3. //29/09/2001
  4.  
  5. #ifndef _CTank_
  6. #define _CTank_
  7.  
  8. class CProjectile;
  9.  
  10. class CTank
  11. {
  12. public:
  13.     //The tank's position is set up in the world class so don't pass the constructor
  14.     //anything
  15.     CTank();
  16.     ~CTank();
  17.  
  18.     //Returns 1 if a collision has occurred between this tank and the specified projectile
  19.     //in the last time step. Returns 0 otherwise.
  20.     int nTestForProjectileTankCollision(const CProjectile * const);
  21.  
  22.     //The tank's position
  23.     double dxPosition,dyPosition;
  24.  
  25.     //The angle of its barrrel (in polar and rectangular form)
  26.     double dInclination;
  27.     double dBarrelx,dBarrely;
  28. };
  29.  
  30. #endif